package com.imooc.es.service;


import com.imooc.es.pojo.Carousel;
import com.imooc.es.pojo.Category;
import com.imooc.es.pojo.vo.CategoryVO;
import com.imooc.es.pojo.vo.NewItemsVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 商品分类
 * @Author: 顾志杰
 * @Date: 2019/11/21
 * @Time: 14:48
 */
@RequestMapping("foodie-search")
public interface CategoryService {

    /**
     * 查询一级分类
     * @return
     */
    @GetMapping("cats")
    public List<Category> queryAllRootLecelCat();

    /**
     * 根据一级分类id查询子分类
     * @param rootCatId
     * @return
     */
    @GetMapping("subCat")
    public List<CategoryVO> getSubCatList(@RequestParam(value = "rootCatId") Integer rootCatId);


    /**
     * 查询首页每个一级分类下的6条最新商品数据
     * @param rootCatId
     * @return
     */
    @GetMapping("sixNewItems")
    public List<NewItemsVO> getSixNewItemsLazy(@RequestParam(value = "rootCatId") Integer rootCatId);

    /**
     * 查询所有轮播图
     * @param isShow
     * @return
     */
    @GetMapping("carousel")
    public List<Carousel> queryAll(@RequestParam("isShow") Integer isShow);
}
